/*
 * @Author: huangyingli
 * @Date: 2023-02-08 14:15:08
 * @LastEditors: huangyingli
 * @LastEditTime: 2023-02-22 14:45:02
 * @Description:
 */
import { Outlet } from 'react-router-dom';
import { useBeforeRouteEach } from '../../hooks/routeHook';
import { Spin } from 'antd';
import { useSelector } from 'react-redux';
import { getLoading, getIsLogin } from '../../redux/common';
export default function Welcom() {
  const loading = useSelector(getLoading);
  const isLogin = useSelector(getIsLogin);
  useBeforeRouteEach();
  return (
    isLogin && (
      <Spin spinning={loading}>
        <div>
          <h1>WELCOM CMS CONSOLE</h1>
          <Outlet />
        </div>
      </Spin>
    )
  );
}
